<?php
class FELOADER extends CI_Controller {
		
	function FELOADER() {
		parent::__construct();
		$this->load->model('fe/fe_loader', 'model');
		$this->load->helper('url', 'form');
	}
	
	public function loadCategories() {
		$categories = $this->model->loadTable('category');
		$frm_cate_home = '<ul>';
		foreach ($categories as $cate) {
			$frm_cate_home .= '<li><input type="checkbox" name="'.$cate['id']. '" value="' . $cate['id'] .'">'. $cate['categoryName'] . '</input> </li>';	
		}		
		return $frm_cate_home . '</ul>';
	}
	
	public function loadPricePolicies() {
		$pprice = $this->model->loadTable('pricepolicy');
		$frm_pprice_home = '<ul>';
		foreach ($pprice as $price) {
			$frm_pprice_home .= '<li><input type="checkbox" name="'.$price['id']. '" value="' . $price['value'] .'">'. $price['value'] . ' .000 </input> </li>';	
		}		
		return $frm_pprice_home . '</ul>';
	}
	
	public function loadProviders() {
		return  $this->model->loadTable('provider');
	}
	
	public function getProvider($id) {
		return $this->model->loadTable('provider', $id);
	}
}